﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using WarOfDev.EF;

namespace WarOfDev.Core
{
    public class BaseController:System.Web.Mvc.Controller
    {
        public Developer CurrentUser
        {
            get
            {
                if (Session["currentUser"] == null)
                {
                    RedirectToAction("Login", "Account", new { returnUrl="/Task/My" });
                    //Response.Redirect(Request.MapPath();
                    //Response.End();
                }
                
                return Session["currentUser"] as Developer;
            }   
        }
    }
}
